package com.wangsd.web.face.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 服务商配置
 */
@Data
@Entity
@Table(name = "service_business")
@ApiModel(value = "服务商", description = "服务商配置信息")
public class ServiceBusiness implements Serializable {

    /**
     * 服务商基本信息
     */
    @ApiModelProperty(value = "服务商名称")
    private String name;
    @ApiModelProperty(value = "服务商简称")
    private String shortName;
    @ApiModelProperty(value = "服务商logo图片地址")
    private String logoUrl;
    @ApiModelProperty(value = "服务商备注")
    private String remark;
    /**
     * 服务商微信配置
     */
    @ApiModelProperty(value = "微信APPID")
    private String wxAppId;
    @ApiModelProperty(value = "微信商户号")
    private String wxMchId;
    @ApiModelProperty(value = "微信商户密钥")
    private String wxMchKey;
    @ApiModelProperty(value = "微信p12证书的位置")
    private String wxKeyPath;
    @ApiModelProperty(value = "微信返佣比例")
    private Integer wxRate;
    /**
     * 服务商支付宝配置
     */
    @ApiModelProperty(value = "支付宝应用ID")
    private String aliAppId;
    @ApiModelProperty(value = "支付宝分润PID")
    private String providerId;
    @ApiModelProperty(value = "支付宝私钥")
    private String aliPrivateKey;
    @ApiModelProperty(value = "支付宝公钥")
    private String aliPublicKey;

    @ApiModelProperty(value = "支付宝公钥证书")
    private String alipayCertPublicKey;
    @ApiModelProperty(value = "应用公钥证书")
    private String appCertPublicKey;
    @ApiModelProperty(value = "根证书")
    private String alipayRootCert;


    @ApiModelProperty(value = "支付宝返佣比例")
    private Integer aliRate;

    /**
     * 以下是通用字段
     */
    @Id
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "检索标识")
    private String code;
}
